<%@ page import="java.sql.*" %>

<% Class.forName("oracle.jdbc.OracleDriver"); %>

<html>
<marquee><p align="center"><b><h1>SEARCH</h1></b></p></marquee>
<body bgcolor="grey">

<%
Connection connection = DriverManager.getConnection(
                "jdbc:oracle:thin:@localhost:1521:xe", "SEPROJECT", "123456");

Statement statement = connection.createStatement();
ResultSet resultset = statement.executeQuery("select product_id , product_name from product");


%>


<form action="http://www.w3schools.com/">
<h4> You can search the product by product id or product name  </h4>
Search by product id :<br>
<input type="text" name="firstname" id="id1">
<br>
<br>

Search by product name :<br>
<input type="text" name="lastname" id="name1">
<br><br><br>
<center><input type="button" name="submit" value="submit"></center>

</form>


<% if (resultSet == id1 ) { %>
      <p>product found</p>
<% } else { %>
      <p>product not found</p>
<% } %>


</body>
</html>